<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>品质检测</title>
    <meta name="description" content="Description">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit"> 
    <!-- 页面 CSS 模板 -->
    $[_commoncss]$
    $[_layoutcss]$
    <!-- 本地 CSS -->
    <link rel="stylesheet" href="../../resources/css/tp-page-nav.css">
    <link rel="stylesheet" href="../../resources/css/common.css">
    <link rel="stylesheet" href="./quality-inspection.css">
    <!-- 页面 JS 模板 -->
    $[_commonjs]$
    $[_layoutjs]$
    <!-- 本地 JS -->
    <script src="../../resources/js/tp-page-nav.js"></script>
    <script src="../assessment-report/quality-currency.js"></script>
    <script src="./quality-inspection.js"></script>
    <!-- 开始检测组件 -->
    <script src="./quality-inspection-test-com.js"></script>
</head>
<body>
<template-layout2 id="app">
    <!-- 顶部面包屑 -->
    <el-breadcrumb slot="breadcrumb" separator="/" class="app-breadcrumb">
        <el-breadcrumb-item>评价管理</el-breadcrumb-item>
        <el-breadcrumb-item><span class="no-redirect">品质检测</span></el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 页面切换 -->
    <div slot="navbar-after" class="app-header">
        <tp-page-nav :items="qualityItems" active-code="djjd_t"></tp-page-nav>
    </div>
    <!-- 待检记录主体内容 start -->
    <div class="app-container" v-show="!showTestPage">
        <!-- 待检记录头部筛选 start -->
        <div class="container-head">
            <div>
                <span>申请编号：</span>
                <el-input :clearable="true" @blur="headSearchTable" @clear="headSearchTable" v-model="insAppNumber" size="medium" style="width: 200px;" placeholder="请输入编号"></el-input>
                <span class="_left-t">状态：</span>
                <el-select @change="headSearchTable" v-model="insState" size="medium" multiple style="width: 300px;" placeholder="请选择状态">
                    <el-option v-for="(item,index) in insStateOptions" :key="index + 'select'" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </div>
            <el-button type="primary" size="medium" @click="addTestHandle">添加检测</el-button>
        </div>
        <!-- 待检记录头部筛选 end -->
        <!-- 待检记录内容 start -->
        <div class="app-containe-t">
            <el-table v-loading="tableLoading" :data="inspectedTableData" stripe style="width: 100%">
                <el-table-column show-overflow-tooltip align="center" prop="apply_number" label="申请编号" width="150"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="grow_big_family" label="种植大户"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="submitted_by" label="联系人"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="seed_rice_name" label="稻种"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="rice_species" label="稻类">
                    <template slot-scope="scope">
                        <span>{{GETTABLENAME(riceTypeList,scope.row.rice_species)}}</span>
                    </template>
                </el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="rice_area" label="所属稻区"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="sow_date" label="播种日期"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="create_time" label="申请日期"></el-table-column>
                <el-table-column show-overflow-tooltip align="center" prop="status" label="状态">
                    <template slot-scope="scope">
                        <span>{{GETTABLENAME(insStateOptions,scope.row.status)}}</span>
                    </template>
                </el-table-column>
                <el-table-column show-overflow-tooltip align="center" label="操作" width="200">
                    <template slot-scope="scope">
                        <el-button type="text" v-show="scope.row.status == 1" @click="receiveClick(scope.row)">接收</el-button>
                        <el-button type="text" v-show="scope.row.status == 2" @click="startTestClick(scope.row)">开始检测</el-button>
                        <el-button type="text" v-show="scope.row.status == 1" @click="noGaugeClick(scope.row)">不予检测</el-button>
                        <el-button type="text" v-show="scope.row.status == 4" disabled>不予检测</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination v-show="inspectedPagination.total != 0" style="margin-top: 10px" background  @size-change="inspectedHandleSizeChange" @current-change="inspectedHandleCurrentChange" :current-page="inspectedPagination.currentPage" :page-sizes="inspectedPagination.pageSizes" :page-size="inspectedPagination.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="inspectedPagination.total">
            </el-pagination>
        </div>
        <!-- 待检记录内容 end -->
    </div>
    <!-- 待检记录主体内容 end -->

    <!-- 开始检测 start -->
    <div class="app-container" v-if="showTestPage">
        <quality-inspection-test-com :options="dataOptions" :dialog-source="dialogSource" @test-back="testBackClick" @test-result-defin="testResultDefinHandle"></quality-inspection-test-com>
    </div>
    <!-- 开始检测 end -->

    
</template-layout2>
<script>
    new Vue({
        el: '#app',
        mixins: [ pageConf ]
    });
</script>
</body>
</html>
